import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/components/toolbar/HomeContainer'
import Member from '@/components/toolbar/MemberContainer'
import ShopCar from '@/components/toolbar/ShopCarContainer'
import Search from '@/components/toolbar/SearchContainer'
import NewsList from '@/components/news/NewsList'
import NewsInfo from '@/components/news/NewsInfo'
import PhotosList from '@/components/photos/PhotosList'
import PhotoInfo from '@/components/photos/PhotoInfo'
import GoodsList from '@/components/goods/GoodsList'
Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/home' },
  { path: '/home', component: Home },
  { path: '/member', component: Member },
  { path: '/shopcar', component: ShopCar },
  { path: '/search', component: Search },
  { path: '/home/newslist', component: NewsList },
  { path: '/home/newsinfo', component: NewsInfo },
  { path: '/home/photoslist', component: PhotosList },
  { path: '/home/photosinfo/:id', component: PhotoInfo },
  { path: '/home/goodlist', component: GoodsList }
]

const router = new VueRouter({
  routes,
  linkActiveClass: 'mui-active'
})

export default router
